package com.kly.sc.api.infras.utils;

import org.apache.commons.lang3.StringUtils;

/**
 * ·
 *
 * @author liuming
 * Created on 下午8:27 2018/10/6.
 */
public class OSSFixUtils {

    public static String fixOssUrl(String url) {
        if (StringUtils.isNotBlank(url)) {
            return url.replace("cashmama-pro.cashmama-oss-pro.", "cashmama-oss-pro.");
        }
        return url;
    }

    public static String fixOssHttpUrl(String url) {
        if (StringUtils.isNotBlank(url)) {
            return url.replace("http://oss-ap-south-1.aliyuncs.com", "http://cashmama-pro.oss-ap-south-1.aliyuncs.com");
        }
        return url;
    }
}
